package app.server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.sql.Connection;

/**
 * @class Main server class, get database connections and wait for client connections
 * @author Sweetie - 2012
 */
public class Server 
{
    //Standard port used in server
    public static final int PORT = 1024;
    //Server socket used to open a port
    private static ServerSocket serverSocket;
    //Standard database reference (singleton)
    private static Connection connection;
    
    public static void main (String [] args)
    {
        try 
        {
            serverSocket = new ServerSocket(Server.PORT);    
        } 
        catch (IOException ex)
        {
            System.out.println(ex.getMessage());
            System.exit(1);
        }
        
        while (true)
        {
            try
            {
                Socket client = serverSocket.accept();
            }
            catch (IOException ex)
            {
                System.out.println(ex.getMessage());
            }
        }
    }
}
